package run.siyuan.jdk.设计模式.装饰模式.装饰模式案例3;

/**
 * @className: HighScoreDecorator
 * @Description: TODO 装饰模式-最高成绩修饰
 * @author: siyuan
 * @date: 2022/3/21 10:39 上午
 */
public class HighScoreDecorator extends Decorator {
    //构造函数
    public HighScoreDecorator(SchoolReport schoolReport) {
        super(schoolReport);
    }

    //我要汇报最高成绩
    private void reportHighScore() {
        System.out.println("这次考试语文最高是75，数学是78，自然是80");
    }

    //我要在老爸看成绩单前告诉他最高成绩，否则等他一看，就抡起扫帚揍我，我哪里还有机会说啊
    @Override
    public void report() {
        this.reportHighScore();
        super.report();
    }
}